home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / amsls196.lzh / AMOSLIST / 000289_M.Berionne@agora.stm.it_Thu Jan 25 09:24:34 1996.msg < prev    next >
Internet Message Format  |  1996-02-02  |  2KB

  1. Received: from conan.eds-ms.com (conan.eds-ms.com [204.240.136.11]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id JAA09499;  for <mcox@access.digex.net> ; Thu, 25 Jan 1996 09:24:30 -0500
  2. From: M.Berionne@agora.stm.it
  3. Received: from agora.stm.it by conan.eds-ms.com (5.x/SMI-SVR4)
  4.     id AA01665; Thu, 25 Jan 1996 08:22:15 -0500
  5. Received: (from root@localhost) by agora.stm.it (8.6.8.1/8.6.6) id OAA17096; Thu, 25 Jan 1996 14:23:34 GMT
  6. Message-Id: <199601251423.OAA17096@agora.stm.it>
  7. To: amos-list@conan.eds-ms.com
  8. Subject: Word
  9. Date: Thu,  25 Jan 96 14:21:44 GMT
  10. Status: RO
  11. X-Status: 
  12.  
  13.  
  14.  
  15.  j> procedure word[search$,num]
  16.  j>    p=1
  17.  j>    while num>1
  18.  j>       p=instr(search$," ",p)
  19.  j>       if p=0 then exit
  20.  j>       inc p
  21.  j>    wend
  22.  j>    epos=instr(search$," ",p)
  23.  j>    if epos=0 then epos=len(search$)+1
  24.  j> end proc[mid$(search$,p,epos-p)]
  25.  
  26. I don't think it could work because you use the variable p for 2 reason:
  27.  
  28. the
  29. first p is the counter to know how many words there are; the second one is
  30. the return value of instr command and it is the pos of the " ".
  31.  
  32. Try changing names to the variables.
  33.  
  34. Bye
  35.  
  36.       _____________________________________________________________
  37.       |   \ | /   Michele Berionne             Not tonight dear,  |
  38.       |    \|/                                 I have a modem!!   |
  39.       |   --*--   Michele_Berionne@amp.flashnet.it                |
  40.       |    /|\                                 Don't panic!!      |
  41.       |   / | \                                                   |
  42.       | BASIC programmers never die, they GOSUB and don't RETURN. |
  43.       |-----------------------------------------------------------|
  44.       *            On AMINET:                                     *
  45.       * game/shoot/fantasy.lha         game/think/atoms.lha       *
  46.       * game/shoot/in_the_target.lha   game/think/navalbattle.lha *
  47.       *                                                           *
  48.       ********************* dev/lang/Logo.lha *********************
  49.       *                                                           *
  50.       */\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*
  51.  
  52.  
  53.  
  54.